from django.urls import path
# ==== 引入views 文件 =======
from trainweb.views import trainee as trainee_views
from trainweb.views import trainee_info as trainee_info_views
from trainweb.views import phase_detail as phase_detail_views


urlpatterns = [
    path("add/", trainee_views.add_value, name="add_trainee"),
    path("del/", trainee_views.del_value, name="del_trainee"),
    path("list/employee/", trainee_views.list_values_by_employee, name="list_trainee_by_employee"),
    path('get/employee_by_line/', trainee_views.get_train_employee, name="get_empolyee_by_line"),
    path('get/dempartment_by_employee/', trainee_views.get_department_by_trainee_employee, name="get_department_by_employee"),
    path('get/position_by_department/', trainee_views.get_position_by_trainee_department, name="get_position_by_department"),
    path('get/phase/fail/', trainee_info_views.get_phase_fail_content, name="get_phase_fail_content"),
    path('get/position/fail/phase/', trainee_info_views.get_position_fail_phase, name="get_position_fail_phase"),
    path('get/fail/content/phase/',trainee_info_views.get_fail_content_by_phase, name="get_fail_content_by_phase"),

    # ===== 培训信息 /info/ ======
    path('', trainee_info_views.index, name="trainee"),
    path('info/', trainee_info_views.index, name="trainee_info"),
    path('info/list/', trainee_info_views.list_values, name="list_trainee_info"),
    path('get/current/phase_phasecontent/', trainee_info_views.get_current_phase_phasecontent, name="get_current_phase_phasecontent"),
    path('info/add/commit/', trainee_info_views.add_record_commit, name="info_add_commit"),
    path('info/edit/commit/', trainee_info_views.edit_record_commit, name="info_edit_commit"),


    #====== 阶段信息 =============
    path('phase/detail/', phase_detail_views.index, name="trainee_phase_detail"),
    path('phase/basic/detail/', phase_detail_views.get_phase_basic_info, name="trainee_phase_basic_detail"),
    path('phase/echarts/', phase_detail_views.get_echarts_data, name="trainee_echarts_data"),
    path('phase/record/detail/', phase_detail_views.get_phase_detail, name="trainee_phase_record_detail"),

    #===== 职位认证 ==================
    path('cert/',trainee_info_views.position_cert, name="trainee_position_cert" ),

]
